package com.xinghanlaser.applet.base.common.config;

import com.xinghanlaser.applet.base.common.utils.cache.CacheService;
import com.xinghanlaser.applet.base.common.utils.cache.CacheType;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * <p>
 *
 * <p>
 *
 * @author: mftuo 陀铭峰
 * @since: 2024/4/29 9:12
 */
@Configuration
public class CacheConfig {
    @Value("${cache.type:LOCAL}")
    private CacheType cacheType;

    @Bean
    public CacheService cacheService(){
        return cacheType.init();
    }
}
